Recommend a different command for missing loaders based on the presence of yarn/npm lock files#291
Merged
weaverryan merged 1 commit intosymfony:masterfrom Apr 12, 2018
Merged
Conversation
…nce of yarn/npm lock files
weaverryan
approved these changes
Mar 31, 2018
Contributor
weaverryan
left a comment
There was a problem hiding this comment.
This looks good. Even as a yarn user, this always bothered me. About #57, I wonder if it's possible to not use any of the default handlers from friendly-errors-webpack-plugin and instead implement that one ourself.
Member
|
AFAICT, it is not possible to disable core formatters in the plugin. So I suggest contributing to the plugin instead (there is already an issue discussing this in the plugin repo, and this is actually where I took the idea of checking lock files to perform the detection, but no PR is opened yet) |
Contributor
|
Thank you @Lyrkan! |
weaverryan
added a commit
that referenced
this pull request
Apr 12, 2018
…on the presence of yarn/npm lock files (Lyrkan) This PR was merged into the master branch. Discussion ---------- Recommend a different command for missing loaders based on the presence of yarn/npm lock files This PR implements #288 by checking which kind of lock files are in the current directory before recommending the user a command to add missing loaders, for instance: * No lock file: `yarn add <packages> --dev` * yarn.lock: `yarn add <packages> --dev` * package-lock.json: `npm install <packages> --save-dev` * yarn.lock and packages-lock.json: `yarn add <packages> --dev` Note that it doesn't fix #57 since that error message is currently only handled by `friendly-errors-webpack-plugin`. Commits ------- f65bffa Recommend a different command for missing packages based on the presence of yarn/npm lock files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements #288 by checking which kind of lock files are in the current directory before recommending the user a command to add missing loaders, for instance:
yarn add <packages> --devyarn add <packages> --devnpm install <packages> --save-devyarn add <packages> --devNote that it doesn't fix #57 since that error message is currently only handled by
friendly-errors-webpack-plugin.